<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:loadBundle basename="prueba.principal.resources.CustomMessages" var="msg" />

<html>
<head>
    <title>Login page</title>
    <link rel="stylesheet" type="text/css" href="/AplicacionJSF2_2/css/estilos.css"/>	
</head>
<body>
<f:view locale="en">
	<h:form>
			
		<table width="350px">
			<tr>
				<td colspan="2" class="login">
					<b><h:outputLabel value="#{msg.login_authentication}"/></b>
				</td>
			</tr>
			<tr>
				<td  colspan="2">				
					<br/>
					<br/>						
					<h:outputText value="#{msg.login_failed}" rendered="#{userBean.error}" escape="false"/>					
				</td>
			</tr>
			<tr>
				<td><h:outputLabel value="#{msg.login_user}"/></td>
				<td><h:inputText id="user" value="#{userBean.user}"/> </td>
			</tr>
			<tr>
				<td><h:outputLabel value="#{msg.login_password}"/></td>
				<td><h:inputSecret id="password" value="#{userBean.password}"/> </td>
			</tr>		
			<tr>
				<td colspan="2" align="center">
					 <h:commandButton action="#{userBean.login}" value="#{msg.login_login}"/>
				</td>
			</tr>
		</table>
		
	</h:form>
</f:view>	
</body>
</html>